//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package org.yaukie.base.constant;

import com.github.pagehelper.PageInfo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.List;

@ApiModel("分页结果类")
public class PageResult<T> {
    public PageInfo pageInfo;
    @ApiModelProperty("合计")
    public long total;
    @ApiModelProperty("列表")
    public List<T> rows;

    public PageResult() {
        this.total = 0L;
        this.rows = null;
    }

    public PageResult(List<T> list) {
        this.pageInfo = new PageInfo(list);
        this.total = this.pageInfo.getTotal();
        this.rows = this.pageInfo.getList();
    }

    public PageResult(long total, List<T> rows) {
        this.total = total;
        this.rows = rows;
    }

    public long getTotal() {
        return this.total;
    }

    public void setTotal(long total) {
        this.total = total;
    }

    public List<T> getRows() {
        return this.rows;
    }

    public void setRows(List<T> rows) {
        this.rows = rows;
    }
}
